const now = new Date();

const year   = now.getFullYear();
const month  = String(now.getMonth() + 1).padStart(2, '0');
const day    = String(now.getDate()).padStart(2, '0');
const hour   = String(now.getHours()).padStart(2, '0');
const minute = String(now.getMinutes()).padStart(2, '0');
const second = String(now.getSeconds()).padStart(2, '0');

const formatted = `${year}-${month}-${day} ${hour}:${minute}:${second}`;
console.log(formatted); // 2025-09-28 14:07:08

let bill_id = $this.model.bill_id;

let formData = new FormData()
formData.append('billId', bill_id) //字符串在 JSON 里的语法规则就是：必须用双引号包裹
formData.append("nowTime", formatted)
$this.spinning = true
$this.$http.post("/formsBusiness/updatePublishDate", formData).then(res => {
    console.log(res.data);
}).catch(e => {
    $this.$message.error(e.message);
});